//导入相应模块
const Koa = require("koa");
const parser = require("koa-parser");
const app = new Koa();
const router = require("koa-router")();



app.use(parser());

const controllers = require("../controllers/default")

app.use(controllers());

router.get("/",async(ctx,next)=>{
    ctx.body = "这是首页"
})

app.use(router.routes());

app.listen(3000,()=>{
    console.log("服务器运行的地址是:http://127.0.0.1:3000");
})


